
function load(url,targetId,inner,me,callback){
	 if(!url){
		return false;
	 }
	 var load = true;
	 var isStr = false;
	 if(me){
		 isStr = isString(me);
	 }
	 if(me && !isStr){
		var a = me.find("a");
	    var loaded = a.attr("data-loaded");
	    if(loaded=="true"){
	    	var reload = a.attr("data-reload");
	    	if(reload=="false"){
	    		load = false
	    	}
	    }
	 }
	 if(load){
		 var $target = null;
		 var isObj = (typeof targetId=='object')&&targetId.constructor==Object; 
		 if(isObj){
			 $target = targetId;
		 }else{
			 $target = $("#"+targetId);
		 }
		 $target.empty();
		 $target.html("<h2>加载中...</h2>");
		 start = false;//关闭之前页面脚本
		 $target.load(window.global.addPara(url,"_json","0")+" #asdba", function( response, status, xhr ) {
			 if(me && !isStr){
				 var ul = me.closest("ul");
//				 ul.find("li").removeClass("active");
//				 me.addClass("active");
				 $('#leftMenu a[data-num]').each(function(){
					var $a = $(this);
					$a.attr("data-loaded","false");
				 });
				 var $a = me.find("a");
				 $a.attr("data-loaded","true");
			 }
			 try{
				 var obj = eval('(' + response + ')');
				 if(obj.oper=="login"){
					 top.location.href = (url);
					 return false;
				 }
			 }catch(e){}
			 
			 if("error"==status){
			 }
			 if(response.indexOf("login-layout")>-1){
				 top.location.href = (url)
				 return false;
			 }
			 if(response.indexOf("druid")>-1){
				 response = response.replaceAll("css/",window.global.ctx+"/druid/css/")
				 response = response.replaceAll("js/",window.global.ctx+"/druid/js/")
				 response = response.replaceAll(window.global.ctx+"/druid/js/common\.js",window.global.ctx+"/static/js/monitor/durid.js")
				 response = response.replace(new RegExp(/(basic\.json)/g),window.global.ctx+"/druid/basic\.json")
			 }
			 try{
				 $target.html(response);
			 }catch(e){}
			 if(callback){
				 callback(response)
			 }
			 if(me && inner){
			     var text = me;
				 if(!isStr){
					 text = me.find("span").text();
				 } 
				 var $lis = $("#page-header>ul>li");
				 var liarray = [];
				 $lis.each(function(){
					 var $li  = $(this);
					 var href = $li.attr("url");
					 if(!$li.hasClass("active")){
						 txt = $li.find("a").text();
					 }else{
						 txt = $li.text();
					 }
					 if(href==url){
						 return false;
					 }
					 liarray.push('<li url="'+href+'"><a href="javascript:void(0)" title="跳转到'+txt+'页面">'+txt+'</a></li>')
				 })
				 liarray.push('<li class="active" url="'+url+'">'+text+'</li>');
				 var $pageheader = $("#page-header>ul");
				 $pageheader.empty();
				 $pageheader.append(liarray.join(""));
			 }
		 });
	 }
}
function isString(str){ 
	return (typeof str=='string')&&str.constructor==String; 
} 